const koaRouter = require('@koa/router')
const { create, remove, update, get, getList } = require('../controller/caseController')
const { verifAuth } = require('../middleware/login.middleware')

const caseRouter = new koaRouter({ prefix: '/case' })
// 增加
caseRouter.post('/', verifAuth, create)
// // 查
caseRouter.get('/:id', get)
caseRouter.get('/', getList)
// // 改
caseRouter.post('/:id', verifAuth, update)
// // 删
caseRouter.delete('/:id', verifAuth, remove)
module.exports = caseRouter
